\hypertarget{classsock_1_1net_1_1_tcp_worker}{}\section{sock\+:\+:net\+:\+:Tcp\+Worker Class Reference}
\label{classsock_1_1net_1_1_tcp_worker}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}


{\ttfamily \#include $<$tcp\+\_\+worker.\+h$>$}

Inheritance diagram for sock\+:\+:net\+:\+:Tcp\+Worker\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classsock_1_1net_1_1_tcp_worker}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structsock_1_1net_1_1_tcp_worker_1_1_statics}{Statics}
\begin{DoxyCompactList}\small\item\em 状态信息 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef boost\+::function$<$ void(\hyperlink{classsock_1_1net_1_1_tcp_connection}{Tcp\+Connection} $\ast$)$>$ \hyperlink{classsock_1_1net_1_1_tcp_worker_a35fba23c2a4971863c4150ed247fe96e}{Pass\+Tcp\+Connection\+Pointer\+Func}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classsock_1_1net_1_1_tcp_worker_a8593b752fabd3539ba8f14c36488bf8e}{Tcp\+Worker} (void)
\item 
virtual \hyperlink{classsock_1_1net_1_1_tcp_worker_a50fb91b5ec83bc8d0afa55f10d01ec72}{$\sim$\+Tcp\+Worker} (void)
\item 
virtual void \hyperlink{classsock_1_1net_1_1_tcp_worker_ac8ff72964ca27b1218484530322b2531}{stop} (void)
\begin{DoxyCompactList}\small\item\em 停止线程 \end{DoxyCompactList}\item 
virtual void \hyperlink{classsock_1_1net_1_1_tcp_worker_ac109fdb1e156de25c7d120d7af0c2ab8}{run} (void)
\begin{DoxyCompactList}\small\item\em 线程执行函数 \end{DoxyCompactList}\item 
void \hyperlink{classsock_1_1net_1_1_tcp_worker_a297a303782cda8befae4bf96c4f9bddf}{bind\+Connection} (\hyperlink{namespacesock_1_1net_ac7ab8c7fe4e8e023f2fea799b74122ed}{Tcp\+Connection\+Ptr} \&conn)
\begin{DoxyCompactList}\small\item\em 绑定连接到工作线程 \end{DoxyCompactList}\item 
void \hyperlink{classsock_1_1net_1_1_tcp_worker_af1c75330f7b70da0f4ad7e1d282eed05}{close\+Connection} (\hyperlink{classsock_1_1net_1_1_tcp_connection}{Tcp\+Connection} $\ast$conn)
\begin{DoxyCompactList}\small\item\em 关闭连接 \end{DoxyCompactList}\item 
int \hyperlink{classsock_1_1net_1_1_tcp_worker_a0fcdb4fe410e074266a7de6021ad7b78}{get\+Load} (void)
\begin{DoxyCompactList}\small\item\em 获取工作线程管理的连接数 \end{DoxyCompactList}\item 
\hyperlink{structsock_1_1net_1_1_tcp_worker_1_1_statics}{Statics} \hyperlink{classsock_1_1net_1_1_tcp_worker_a029d169a58cfc41b29efaee972f41980}{get\+Statics} (void)
\begin{DoxyCompactList}\small\item\em 获取服务器状态 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classsock_1_1net_1_1_tcp_worker_a3ecf3132e8c4bf890c07853cfab7619c}{Tcp\+Server}
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
服务器工作线程 

\subsection{Member Typedef Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_worker_a35fba23c2a4971863c4150ed247fe96e}{}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}!Pass\+Tcp\+Connection\+Pointer\+Func@{Pass\+Tcp\+Connection\+Pointer\+Func}}
\index{Pass\+Tcp\+Connection\+Pointer\+Func@{Pass\+Tcp\+Connection\+Pointer\+Func}!sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}
\subsubsection[{Pass\+Tcp\+Connection\+Pointer\+Func}]{\setlength{\rightskip}{0pt plus 5cm}typedef boost\+::function$<$void({\bf Tcp\+Connection}$\ast$)$>$ {\bf sock\+::net\+::\+Tcp\+Worker\+::\+Pass\+Tcp\+Connection\+Pointer\+Func}}\label{classsock_1_1net_1_1_tcp_worker_a35fba23c2a4971863c4150ed247fe96e}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_worker_a8593b752fabd3539ba8f14c36488bf8e}{}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}!Tcp\+Worker@{Tcp\+Worker}}
\index{Tcp\+Worker@{Tcp\+Worker}!sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}
\subsubsection[{Tcp\+Worker(void)}]{\setlength{\rightskip}{0pt plus 5cm}Tcp\+Worker\+::\+Tcp\+Worker (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_tcp_worker_a8593b752fabd3539ba8f14c36488bf8e}
\hypertarget{classsock_1_1net_1_1_tcp_worker_a50fb91b5ec83bc8d0afa55f10d01ec72}{}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}!````~Tcp\+Worker@{$\sim$\+Tcp\+Worker}}
\index{````~Tcp\+Worker@{$\sim$\+Tcp\+Worker}!sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}
\subsubsection[{$\sim$\+Tcp\+Worker(void)}]{\setlength{\rightskip}{0pt plus 5cm}Tcp\+Worker\+::$\sim$\+Tcp\+Worker (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1_tcp_worker_a50fb91b5ec83bc8d0afa55f10d01ec72}


\subsection{Member Function Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_worker_a297a303782cda8befae4bf96c4f9bddf}{}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}!bind\+Connection@{bind\+Connection}}
\index{bind\+Connection@{bind\+Connection}!sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}
\subsubsection[{bind\+Connection(\+Tcp\+Connection\+Ptr \&conn)}]{\setlength{\rightskip}{0pt plus 5cm}void Tcp\+Worker\+::bind\+Connection (
\begin{DoxyParamCaption}
\item[{{\bf Tcp\+Connection\+Ptr} \&}]{conn}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_tcp_worker_a297a303782cda8befae4bf96c4f9bddf}


绑定连接到工作线程 


\begin{DoxyParams}{Parameters}
{\em conn} & \\
\hline
\end{DoxyParams}
\hypertarget{classsock_1_1net_1_1_tcp_worker_af1c75330f7b70da0f4ad7e1d282eed05}{}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}!close\+Connection@{close\+Connection}}
\index{close\+Connection@{close\+Connection}!sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}
\subsubsection[{close\+Connection(\+Tcp\+Connection $\ast$conn)}]{\setlength{\rightskip}{0pt plus 5cm}void Tcp\+Worker\+::close\+Connection (
\begin{DoxyParamCaption}
\item[{{\bf Tcp\+Connection} $\ast$}]{conn}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_tcp_worker_af1c75330f7b70da0f4ad7e1d282eed05}


关闭连接 


\begin{DoxyParams}{Parameters}
{\em conn} & \\
\hline
\end{DoxyParams}
\hypertarget{classsock_1_1net_1_1_tcp_worker_a0fcdb4fe410e074266a7de6021ad7b78}{}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}!get\+Load@{get\+Load}}
\index{get\+Load@{get\+Load}!sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}
\subsubsection[{get\+Load(void)}]{\setlength{\rightskip}{0pt plus 5cm}int sock\+::net\+::\+Tcp\+Worker\+::get\+Load (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classsock_1_1net_1_1_tcp_worker_a0fcdb4fe410e074266a7de6021ad7b78}


获取工作线程管理的连接数 

\begin{DoxyReturn}{Returns}
int 
\end{DoxyReturn}
\hypertarget{classsock_1_1net_1_1_tcp_worker_a029d169a58cfc41b29efaee972f41980}{}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}!get\+Statics@{get\+Statics}}
\index{get\+Statics@{get\+Statics}!sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}
\subsubsection[{get\+Statics(void)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Statics} sock\+::net\+::\+Tcp\+Worker\+::get\+Statics (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classsock_1_1net_1_1_tcp_worker_a029d169a58cfc41b29efaee972f41980}


获取服务器状态 

\begin{DoxyReturn}{Returns}
\hyperlink{structsock_1_1net_1_1_tcp_worker_1_1_statics}{Statics} 
\end{DoxyReturn}
\hypertarget{classsock_1_1net_1_1_tcp_worker_ac109fdb1e156de25c7d120d7af0c2ab8}{}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}!run@{run}}
\index{run@{run}!sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}
\subsubsection[{run(void)}]{\setlength{\rightskip}{0pt plus 5cm}void Tcp\+Worker\+::run (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1_tcp_worker_ac109fdb1e156de25c7d120d7af0c2ab8}


线程执行函数 



Implements \hyperlink{classsock_1_1base_1_1_thread_a4b53c0e0df28893e36e92ea0f3723a2f}{sock\+::base\+::\+Thread}.

\hypertarget{classsock_1_1net_1_1_tcp_worker_ac8ff72964ca27b1218484530322b2531}{}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}!stop@{stop}}
\index{stop@{stop}!sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}
\subsubsection[{stop(void)}]{\setlength{\rightskip}{0pt plus 5cm}void Tcp\+Worker\+::stop (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1_tcp_worker_ac8ff72964ca27b1218484530322b2531}


停止线程 



Reimplemented from \hyperlink{classsock_1_1base_1_1_thread_a27853293167cb8128d986dd856a77d8e}{sock\+::base\+::\+Thread}.



\subsection{Friends And Related Function Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_worker_a3ecf3132e8c4bf890c07853cfab7619c}{}\index{sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}!Tcp\+Server@{Tcp\+Server}}
\index{Tcp\+Server@{Tcp\+Server}!sock\+::net\+::\+Tcp\+Worker@{sock\+::net\+::\+Tcp\+Worker}}
\subsubsection[{Tcp\+Server}]{\setlength{\rightskip}{0pt plus 5cm}friend class {\bf Tcp\+Server}\hspace{0.3cm}{\ttfamily [friend]}}\label{classsock_1_1net_1_1_tcp_worker_a3ecf3132e8c4bf890c07853cfab7619c}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
E\+:/git/sock/sock/net/\hyperlink{tcp__worker_8h}{tcp\+\_\+worker.\+h}\item 
E\+:/git/sock/src/net/\hyperlink{tcp__worker_8cc}{tcp\+\_\+worker.\+cc}\end{DoxyCompactItemize}
